<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/31 0031
 * Time: 09:38
 */
$redis = new Redis();

$redis->connect('127.0.0.1',6379);

$redis->auth('redis123456');

$arr = array('h','e','l','l','o','w','o','r','l','d');

foreach($arr as $k=>$v){

    $redis->rpush("mylist",$v);

}